<?php

use common\models\User;
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

/* @var $this yii\web\View */
/* @var $model backend\models\UserForm */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $roles yii\rbac\Role[] */
/* @var $permissions yii\rbac\Permission[] */
?>

<div class="user-form">

    <?php $form = ActiveForm::begin(); ?>
    <div class="col-sm-4">
        <?= $form->field($model, 'username') ?>
    </div>
    <div class="col-sm-4">
        <?= $form->field($model, 'display_name') ?>
    </div>
    <div class="col-sm-4">
        <?= $form->field($model, 'email') ?>
    </div>
    <div class="col-sm-4">
        <?= $form->field($model, 'password')->passwordInput() ?>
    </div>
    <div class="col-sm-4">
        <?= $form->field($model, 'tel')?>
    </div>
    <div class="col-sm-4">
        <?= $form->field($model, 'groups')->dropDownList(User::groups(), ['class' => 'dropdown']) ?>
    </div>
    <div class="col-sm-4">
        <?= $form->field($model, 'status')->dropDownList(User::statuses(), ['class' => 'dropdown']) ?>
    </div>
    <div class="col-sm-5 col-sm-roles">
        <?= $form->field($model, 'roles')->checkboxList($roles) ?>
    </div>
    <div class="form-group-buttons">
        <?= Html::submitButton(Yii::t('backend', 'Save'), ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?>
    </div>
    <?php ActiveForm::end(); ?>

</div>
